/**
 * 
 */
package org.rollinitiative.d20.items;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;

/**
 * @author bebopjmm
 * 
 */
@XmlType(name = "ItemType", namespace = "java:org.rollinitiative.d20.item")
public abstract class Item
{

   @XmlType(name = "CraftsmanshipEnum", namespace = "java:org.rollinitiative.d20.item")
   public enum Craftsmanship {
      MUNDANE, MASTERWORK, MAGICAL;
   }

   private QName typeID;

   private String name = "Unnamed Item";

   private double gpCost = 0;

   private double weight = 0;

   private Craftsmanship craftsmanship = Craftsmanship.MUNDANE;

   
   abstract protected void configure();

   /**
    * @return the name
    */
   public String getName()
   {
      return name;
   }


   /**
    * @param name the name to set
    */
   @XmlAttribute(required = true)
   public void setName(String name)
   {
      this.name = name;
   }


   /**
    * @return the typeID
    */
   public QName getTypeID()
   {
      return typeID;
   }


   /**
    * @param typeID the typeID to set
    */
   @XmlAttribute(required = true)
   public void setTypeID(QName typeID)
   {
      this.typeID = typeID;
   }


   /**
    * @return the weight of this item
    */
   public double getWeight()
   {
      return weight;
   }


   /**
    * @param weight the weight to set for this item
    */
   @XmlAttribute(required = true)
   public void setWeight(double weight)
   {
      this.weight = weight;
   }


   /**
    * @return the craftsmanship
    */
   public Craftsmanship getCraftsmanship()
   {
      return craftsmanship;
   }


   /**
    * @param craftsmanship the craftsmanship to set
    */
   @XmlAttribute(required = true)
   public void setCraftsmanship(Craftsmanship craftsmanship)
   {
      this.craftsmanship = craftsmanship;
   }


   /**
    * @return the gpCost
    */
   public double getGpCost()
   {
      return gpCost;
   }


   /**
    * @param gpCost the gpCost to set
    */
   @XmlAttribute(required = true)
   public void setGpCost(double gpCost)
   {
      this.gpCost = gpCost;
   }

}
